finding the area under a curve